﻿using System.Collections.Generic;
using RanchBuddy.Core.DataAccess;
using RanchBuddy.Core.DataAccess.Impl;
using RanchBuddy.Core.Domain.Impl;
using StructureMap;

namespace RanchBuddy.Core.Services.Impl
{
    [Pluggable("Default")]
    public class CompanyAccountTypeService : ICompanyAccountTypeService
    {
        public List<CompanyAccountType> GetCompanyAccountTypes(int CompanyTypeID)
        {
            IRepositoryStatus rs = ObjectFactory.GetInstance<CompanyAccountTypeRepository>().GetCompanyAccountTypes(CompanyTypeID);
            List<CompanyAccountType> result = new List<CompanyAccountType>();
            if(rs.StatusType == Status.StatusTypes.Success)
            {
                result = rs.GetObject <List<CompanyAccountType>>();
            }
            return result;
        }
    }
}
